From: Jan Beulich Date: Wed, 19 Sep 2012 07:26:26 +0000 (+0200) Subject: x86/ACPI: fix error indication from acpi_parse_madt_lapic_entries() X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~7878 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:///%22http:/www.example.com/cgi/%22https:/?a=commitdiff_plain;h=96f0763e3f86af23d47aaaaf760d521815a97b61;p=xen.git x86/ACPI: fix error indication from acpi_parse_madt_lapic_entries() If the legacy APIC invocation of acpi_table_parse_madt() succeeds but the x2APIC counterpart fails, this is regarded as failure by the function, yet its return value would indicate success. Signed-off-by: Jan Beulich Acked-by: Keir Fraser --- diff --git a/xen/arch/x86/acpi/boot.c b/xen/arch/x86/acpi/boot.c index 64c76f593f..e518e910fc 100644 --- a/xen/arch/x86/acpi/boot.c +++ b/xen/arch/x86/acpi/boot.c @@ -452,7 +452,7 @@ static int __init acpi_parse_madt_lapic_entries(void) } else if (count < 0 || x2count < 0) { printk(KERN_ERR PREFIX "Error parsing LAPIC entry\n"); /* TBD: Cleanup to allow fallback to MPS */ - return count; + return count < 0 ? count : x2count; } count = @@ -464,7 +464,7 @@ static int __init acpi_parse_madt_lapic_entries(void) if (count < 0 || x2count < 0) { printk(KERN_ERR PREFIX "Error parsing LAPIC NMI entry\n"); /* TBD: Cleanup to allow fallback to MPS */ - return count; + return count < 0 ? count : x2count; } return 0; }